package com.algo.FJSP.GaForFJSP;

import lombok.Data;

import java.util.UUID;

/**
 * @Author: guoxing
 * @Email: gx_study2022@163.com
 * @Description:
 * @Date: 2024/7/4 22:10
 * @ClassName: Individual
 **/
@Data
public class Individual {
    //设备选择编码
    private int[] csCode;
    //工序排序编码
    private int[] osCode;
    //个体适应值
    private double fitness;
    //该个体的唯一标识码
    private final String uuid= UUID.randomUUID().toString();

    public Individual() {
    }

    public Individual(int[] csCode, int[] osCode) {
        this.csCode = csCode;
        this.osCode = osCode;
    }
    public Individual clone(){
        Individual clone = new Individual(this.csCode.clone(), this.osCode.clone());
        clone.setFitness(this.fitness);
        return clone;
    }
}
